Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1633256 > unrolled thread
| Started by | Martin Kaiser <martin@kaiser.cx> |
|---|---|
| First post | 2017-04-29 09:10 +0200 |
| Last post | 2017-04-30 15:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry Martin Kaiser <martin@kaiser.cx> - 2017-04-29 09:10 +0200
Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-04-30 15:00 +0200
| From | Martin Kaiser <martin@kaiser.cx> |
|---|---|
| Date | 2017-04-29 09:10 +0200 |
| Subject | Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry |
| Message-ID | <tBuFX-39X-5@gated-at.bofh.it> |
Hello Andy,
Thus wrote Andy Shevchenko (andy.shevchenko@gmail.com):
> On Tue, Apr 18, 2017 at 12:11 PM, Martin Kaiser <martin@kaiser.cx> wrote:
> > checkpatch is asking for a 4 digit octal number. And at least for me,
> > 0444 makes it clearer what the permissions actually are. Yes, somewhere
> > in the code, I can dig up that 0 is changed to 0444...
> Aren't 0 and 0444 different by meaning?
my undestanding is that proc_create() calls proc_create_data(), where
if ((mode & S_IALLUGO) == 0)
mode |= S_IRUGO;
sets mode to 0444 when it was 0.
Best regards,
Martin
(added the lkml back to Cc, I removed it by accident in an earlier mail)
[toc] | [next] | [standalone]
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Date | 2017-04-30 15:00 +0200 |
| Subject | Re: [PATCH 2/2 v2] char: misc: use octal permissions for the proc entry |
| Message-ID | <tBWCd-3lS-13@gated-at.bofh.it> |
| In reply to | #1633256 |
On Sat, Apr 29, 2017 at 10:05 AM, Martin Kaiser <martin@kaiser.cx> wrote: > Thus wrote Andy Shevchenko (andy.shevchenko@gmail.com): >> On Tue, Apr 18, 2017 at 12:11 PM, Martin Kaiser <martin@kaiser.cx> wrote: >> Aren't 0 and 0444 different by meaning? > > my undestanding is that proc_create() calls proc_create_data(), where > > if ((mode & S_IALLUGO) == 0) > mode |= S_IRUGO; > > sets mode to 0444 when it was 0. Ah, okay. Fair enough. -- With Best Regards, Andy Shevchenko
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web