Programmatically cache line

2017-12-29 Thread blubee blubeeme
Is there some way to programmatically get the CPU cache line sizes on
FreeBSD?
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Allowing local console root login on PAM initialization failure

2017-12-29 Thread mqudsi
Hello all,

I have a question regarding the behavior of the PAM module, in particular
pertaining to the default behavior wherein root login is completely disabled
(even from the physical console) when the permissions on the PAM configuration
files in `/etc/pam.d/` are incorrect (anything other than `600`).

It absolutely makes sense for the PAM mechanism to fail to initialize for
safety reasons under these circumstances, and activities such as remote login,
ssh authentication, su/sudo, etc. all make sense to be blocked. But given that
the PAM configuration can be reset from the local machine in single user mode,
is there a benefit to blocking root login at the tty when PAM fails to
initialize?

For reference, attempting to log in at the console when the permissions on
`/etc/pam.d/` are incorrect gives the following error:

```
freebsd login: in openpam_check_desc_owner_perms(): /etc/pam.d/login: insecure
ownership or permissions
freebsd login: pam_start(): system error
```

Just wondering if this behavior is intentional or if patches to allow login
at the local console upon PAM failure would be welcomed.

Thank you,

Mahmoud Al-Qudsi
NeoSmart Technologies


___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: evdev broken

2017-12-29 Thread Shawn Webb
On Fri, Dec 29, 2017 at 02:36:34PM -0500, Shawn Webb wrote:
> On Fri, Dec 29, 2017 at 08:33:15PM +0100, Michael Gmelin wrote:
> > 
> > 
> > > On 29. Dec 2017, at 20:15, Shawn Webb  wrote:
> > > 
> > > Hey All,
> > > 
> > > It looks like evdev support in the kernel is broken.
> > > sys/dev/kbdmux/kbdmux.c contains various unresolved symbols to
> > > different evdev-related symbols.
> > > 
> > > I have the following options in my kernel config:
> > > 
> > > options EVDEV_SUPPORT
> > > options EVDEV_DEBUG
> > > options UINPUT_DEBUG
> > 
> > Did you add "device evdev"?
> 
> Good catch! I did not. Adding now and I'll report back when
> buildkernel finishes.

That did the trick. Thanks!

Seems like evdev doesn't have a manpage, which is why I didn't know to
include it in my kernel config.

Thanks,

-- 
Shawn Webb
Cofounder and Security Engineer
HardenedBSD

Tor-ified Signal:+1 443-546-8752
GPG Key ID:  0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE


signature.asc
Description: PGP signature


Re: evdev broken

2017-12-29 Thread Michael Gmelin


> On 29. Dec 2017, at 20:15, Shawn Webb  wrote:
> 
> Hey All,
> 
> It looks like evdev support in the kernel is broken.
> sys/dev/kbdmux/kbdmux.c contains various unresolved symbols to
> different evdev-related symbols.
> 
> I have the following options in my kernel config:
> 
> options EVDEV_SUPPORT
> options EVDEV_DEBUG
> options UINPUT_DEBUG

Did you add "device evdev"?

-m


> 
> Here's the build failure log:
> 
> linking kernel.full   
>   
>
> ld: error: undefined symbol: evdev_rcpt_mask  
>   
>
 referenced by kbdmux.c:1190 (/usr/src/sys/dev/kbdmux/kbdmux.c:1190)

  
  kbdmux.o:(kbdmux_init)

 
> 
> ld: error: undefined symbol: evdev_push_leds  
>   
>
 referenced by kbdmux.c:1191 (/usr/src/sys/dev/kbdmux/kbdmux.c:1191)
  kbdmux.o:(kbdmux_init)

 
> 
> ld: error: undefined symbol: evdev_alloc  
>   
>
 referenced by kbdmux.c:492 (/usr/src/sys/dev/kbdmux/kbdmux.c:492)
  kbdmux.o:(kbdmux_init)
> 
> ld: error: undefined symbol: evdev_set_name 
 referenced by kbdmux.c:493 (/usr/src/sys/dev/kbdmux/kbdmux.c:493)
  kbdmux.o:(kbdmux_init) 
> 
> ld: error: undefined symbol: evdev_set_phys
 referenced by kbdmux.c:495 (/usr/src/sys/dev/kbdmux/kbdmux.c:495)
  kbdmux.o:(kbdmux_init) 
> 
> ld: error: undefined symbol: evdev_set_id 
>  
 referenced by kbdmux.c:496 (/usr/src/sys/dev/kbdmux/kbdmux.c:496)
  kbdmux.o:(kbdmux_init)
> 
> ld: error: undefined symbol: evdev_set_methods   
 referenced by kbdmux.c:497 (/usr/src/sys/dev/kbdmux/kbdmux.c:497)
  kbdmux.o:(kbdmux_init)
> 
> ld: error: undefined symbol: evdev_support_event
 referenced by kbdmux.c:498 (/usr/src/sys/dev/kbdmux/kbdmux.c:498)
  kbdmux.o:(kbdmux_init)
> 
> ld: error: undefined symbol: evdev_support_event
 referenced by kbdmux.c:499 (/usr/src/sys/dev/kbdmux/kbdmux.c:499)
  kbdmux.o:(kbdmux_init)
> 
> ld: error: undefined symbol: evdev_support_event
 referenced by kbdmux.c:500 (/usr/src/sys/dev/kbdmux/kbdmux.c:500)
  kbdmux.o:(kbdmux_init)
> 
> ld: error: undefined symbol: evdev_support_event
 referenced by kbdmux.c:501 (/usr/src/sys/dev/kbdmux/kbdmux.c:501)
  kbdmux.o:(kbdmux_init)


> 
> ld: error: undefined symbol: evdev_support_all_known_keys
 referenced by kbdmux.c:502 (/usr/src/sys/dev/kbdmux/kbdmux.c:502)
  kbdmux.o:(kbdmux_init) 
> 
> ld: error: undefined symbol: evdev_support_led
 referenced by kbdmux.c:503 (/usr/src/sys/dev/kbdmux/kbdmux.c:503)
  kbdmux.o:(kbdmux_init)
> 
> ld: error: undefined symbol: evdev_support_led
 referenced by kbdmux.c:504 (/usr/src/sys/dev/kbdmux/kbdmux.c:504)
  kbdmux.o:(kbdmux_init)

 
> 
> ld: error: undefined symbol: evdev_support_led
 referenced by kbdmux.c:505 (/usr/src/sys/dev/kbdmux/kbdmux.c:505)
  kbdmux.o:(kbdmux_init)  
> 
> ld: error: undefined symbol: evdev_register   
 referenced by kbdmux.c:507 (/usr/src/sys/dev/kbdmux/kbdmux.c:507)
  kbdmux.o:(kbdmux_init)  
> 
> ld: error: undefined symbol: evdev_free   
>   
>
 referenced by kbdmux.c:508 (/usr/src/sys/dev/kbdmux/kbdmux.c:508)
  kbdmux.o:(kbdmux_init) 
> 

Re: evdev broken

2017-12-29 Thread Shawn Webb
On Fri, Dec 29, 2017 at 08:33:15PM +0100, Michael Gmelin wrote:
> 
> 
> > On 29. Dec 2017, at 20:15, Shawn Webb  wrote:
> > 
> > Hey All,
> > 
> > It looks like evdev support in the kernel is broken.
> > sys/dev/kbdmux/kbdmux.c contains various unresolved symbols to
> > different evdev-related symbols.
> > 
> > I have the following options in my kernel config:
> > 
> > options EVDEV_SUPPORT
> > options EVDEV_DEBUG
> > options UINPUT_DEBUG
> 
> Did you add "device evdev"?

Good catch! I did not. Adding now and I'll report back when
buildkernel finishes.

Thanks,

-- 
Shawn Webb
Cofounder and Security Engineer
HardenedBSD

Tor-ified Signal:+1 443-546-8752
GPG Key ID:  0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE


signature.asc
Description: PGP signature


evdev broken

2017-12-29 Thread Shawn Webb
Hey All,

It looks like evdev support in the kernel is broken.
sys/dev/kbdmux/kbdmux.c contains various unresolved symbols to
different evdev-related symbols.

I have the following options in my kernel config:

options EVDEV_SUPPORT
options EVDEV_DEBUG
options UINPUT_DEBUG

Here's the build failure log:

linking kernel.full 

   
ld: error: undefined symbol: evdev_rcpt_mask

   
>>> referenced by kbdmux.c:1190 (/usr/src/sys/dev/kbdmux/kbdmux.c:1190) 
>>> 
>>>
>>>   kbdmux.o:(kbdmux_init)
>>> 
>>>


   
ld: error: undefined symbol: evdev_push_leds

   
>>> referenced by kbdmux.c:1191 (/usr/src/sys/dev/kbdmux/kbdmux.c:1191) 
>>> 
>>>
>>>   kbdmux.o:(kbdmux_init)
>>> 
>>>


   
ld: error: undefined symbol: evdev_alloc

   
>>> referenced by kbdmux.c:492 (/usr/src/sys/dev/kbdmux/kbdmux.c:492)   
>>> 
>>>
>>>   kbdmux.o:(kbdmux_init)

ld: error: undefined symbol: evdev_set_name 
>>> referenced by kbdmux.c:493 (/usr/src/sys/dev/kbdmux/kbdmux.c:493)
>>>   kbdmux.o:(kbdmux_init) 

ld: error: undefined symbol: evdev_set_phys
>>> referenced by kbdmux.c:495 (/usr/src/sys/dev/kbdmux/kbdmux.c:495)
>>>   kbdmux.o:(kbdmux_init) 

ld: error: undefined symbol: evdev_set_id   
   
>>> referenced by kbdmux.c:496 (/usr/src/sys/dev/kbdmux/kbdmux.c:496)
>>>   kbdmux.o:(kbdmux_init)

ld: error: undefined symbol: evdev_set_methods   
>>> referenced by kbdmux.c:497 (/usr/src/sys/dev/kbdmux/kbdmux.c:497)
>>>   kbdmux.o:(kbdmux_init)
 
ld: error: undefined symbol: evdev_support_event
>>> referenced by kbdmux.c:498 (/usr/src/sys/dev/kbdmux/kbdmux.c:498)
>>>   kbdmux.o:(kbdmux_init)

ld: error: undefined symbol: evdev_support_event
>>> referenced by kbdmux.c:499 (/usr/src/sys/dev/kbdmux/kbdmux.c:499)
>>>   kbdmux.o:(kbdmux_init)
   
ld: error: undefined symbol: evdev_support_event
>>> referenced by kbdmux.c:500 (/usr/src/sys/dev/kbdmux/kbdmux.c:500)
>>>   kbdmux.o:(kbdmux_init)
   
ld: error: undefined symbol: evdev_support_event
>>> referenced by kbdmux.c:501 (/usr/src/sys/dev/kbdmux/kbdmux.c:501)
>>>   kbdmux.o:(kbdmux_init)
>>> 
>>>   


ld: error: undefined symbol: evdev_support_all_known_keys
>>> referenced by kbdmux.c:502 (/usr/src/sys/dev/kbdmux/kbdmux.c:502)
>>>   kbdmux.o:(kbdmux_init) 
  
ld: error: undefined symbol: evdev_support_led
>>> referenced by kbdmux.c:503 (/usr/src/sys/dev/kbdmux/kbdmux.c:503)
>>>   kbdmux.o:(kbdmux_init)
  
ld: error: undefined symbol: evdev_support_led
>>> referenced by kbdmux.c:504 (/usr/src/sys/dev/kbdmux/kbdmux.c:504)
>>>   kbdmux.o:(kbdmux_init)
>>>